#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QPainterPath>
#include <QImage>
#include <QPainter>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
protected:
    bool event(QEvent *event) override;
private slots:
    void checkWho();
private:
    void setPenStyle();
private:
    Ui::Widget *ui;
    QImage image;
    int num = 1;
    QPoint first,before,last;
    QPainter painter;
    QPainterPath path;

};
#endif // WIDGET_H
